import {createRouter,createWebHashHistory} from 'vue-router'

import Home from '../view/Home.vue'
import About from '@/view/About.vue'
import Next from '@/view/Next.vue'
import User from '@/view/Next.vue'


const routes = [
    { path: '/next', component: Next },
    { path: '/home', component: Home },
    { path: '/about', component: About },
    { path: '/user', component: User },
  ]

  const router = createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: createWebHashHistory(),
    routes, // `routes: routes` 的缩写
  })

  export default router